package com.tsj.spzx.client.feign;

import com.tsj.spzx.model.dto.product.SkuSaleDto;
import com.tsj.spzx.model.entity.product.ProductSku;
import com.tsj.spzx.model.vo.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "service-product")
public interface ProductFeignClient {

    @GetMapping("/api/product/getBySkuId/{skuId}")
    Result<ProductSku> getBySkuId(@PathVariable("skuId") Long skuId);

    @PostMapping("/api/product/findProductBySkuIdList")
    public List<ProductSku> findProductBySkuIdList(List<Long> skuIdList);

    @PostMapping("/api/product/updateProductSku")
    public Result updateProductSku(@RequestBody List<SkuSaleDto> skuSaleDtoList);
}
